﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace ShootMan
{
    public interface ITestInstance : shaco.Base.IGameInstance
    {
        void Print();
    }

    public class TestInstance : ITestInstance
    {
        public void Print()
        {
            Debug.Log("ShootManHelper TestInstance Print: ....");
        }
    }

    public class ShootManHelper : shaco.Base.IGameHelper
    {
        /// <summary>
        /// 测试单例
        /// </summary>
        [shaco.Base.GameInterfaceTypeAtrribute("TestInstance", "ShootMan")]
        static public ITestInstance testInstance
        {
            get { if (null == _testInstance) _testInstance = GetOrSetDefaultInterface<ITestInstance, TestInstance>(); return _testInstance; }
            set { BindInterface<ITestInstance>(value); _testInstance = value; }
        }
        static private ITestInstance _testInstance = null;
    }
}